﻿<php>$meta_title = $vo['sale_no']." 售后退款";</php>
<include file="Public:header" />
<div id="main" class="main" >
    <div class="content">
  <h3 class="heading">{$vo.sale_no}售后退款 [ <a href="__URL__">返回列表</a> ] 
  </h3>
<div id="result" class="result none"></div>
<table cellpadding=3 cellspacing=3 >
    <form class="form-horizontal well" method='post' id="form1" action="__URL__/add/">
    <tr><td colspan="4" class="heading h4 alert alert-info">订单号：{$vo.sale_no} 
        <span class="offset1">原单号及来源：
           {$vo.order_source_id|getModelName='Order_source'} | {$vo.mall_no}
        </span>
        <span class="offset1">配货状态：{$vo.prepare_status|getConfigVal="prepare_status"}</span>
        <span class="offset1"> <eq name="vo.status" value="0"> 未审核<else/> 审核通过 </eq> </span>
       </td>
    </tr>
    <tr>
        <td>订单状态：</td><td>{$vo.order_status|getConfigVal="orderStatus"}</td>
        <td>应付款：</td><td>{$vo.should_pay}</td>
    </tr>
    <tr>
        <td>买家：</td><td>{$vo.customer_name}
            <input type="hidden" name="customer_id" value="{$vo.customer_id}" >
        </td>
        <td>下单时间：</td><td>{$vo.create_time|toDate}</td>
    </tr>
     <tr> <td>收货人：</td><td>{$vo.shipping_name} </td>
          <td>地址：</td><td>{$vo.address} </td>
    </tr>
    <tr>
    <php> $goods = S('goods');   </php>
        <td colspan="4">
         <table class="table table-bordered">
            <tr>
                <th>商品</th><th>数量</th><th>退款时段</th><th>退款类型</th><th>退款金额</th> <th>退款原因</th><th>备注</th><th>操作</th>
            </tr>
                <volist name="sdetails" id="sdetail">
            <tr>     <td> <input type="hidden" name="sale_id[]" value="{$vo.id}"  />
                     {:$goods[$sdetail['product_id']]['name']}
                     <input type="hidden" name="goods_id[]" value="{$sdetail.product_id}" />
                     <input type="hidden" name="mall_no[]" value="{$vo.mall_no}" />
                     <input type="hidden" name="order_source_id[]" value="{$vo.order_source_id}" />
                 </td>
                 <td> <input id="" type="text" name="number[]" value="{$sdetail.number}" class="span1" />  </td>
                 <td>{:configList(C('refund_time') ,'0','refund_time[]' )} </td>
                 <td>{:configList(C('refund_type') ,'0','refund_type[]' )} </td>
                 <td> <input id="" type="text" name="refund[]" value="{$sdetail.total}" class="span1" /> </td>
                 <td>{:configList(C('refund_reason') ,'','reason[]' )} </td>
                 <td> <textarea id="" type="text" name="remark[]" value="" class="input-xlarge" ></textarea>  </td>
                <td class='span1'><img src='__PUBLIC__/Images/publish_x.png' width="20" height="20" alt='删除' onclick='removerow(this);'/></td>
        </tr>
                </volist>
            </tr>
         </table>
        </td>
    </tr>
    <tr>
	<td></td>
	<td class="center" width="300">
        <input type="hidden" value="{$vo.id}" name="id">
  	    <button type="submit" class="btn btn-primary"><i class="icon-ok icon-white"></i> 保存</button>
	<button type="reset" onclick="javascript:history.back()" class="btn btn-primary offset1"><i class="icon-arrow-left icon-white"></i> 返回</button>
	</td>
</tr>
</form>
</table>

</div>
</div>
<include file="Public:footer" />
<script type="text/javascript" src="__PUBLIC__/Js/jquery-1.4.4.min.js"></script>
<script type="text/javascript">
function removerow(obj){
    var objnum = jQuery(obj).parent().parent().parent().children().size();
    jQuery(obj).parent().parent().remove();
}
</script>
